Image-capturing apparatus and control method thereof

ABSTRACT

The image-capturing apparatus (100) includes an image sensor (14), a focus detector (42) performing focus detection using output from the image sensor; and a controller (50) configured to cause the focus detector to perform the focus detection and configured to control emission of a light emitter for illuminating an object and movement of a focus element for focusing. The controller selectively performs: a first focus detection process that causes the focus detector to perform the focus detection with the focus element being stopped while causing the light emitter to intermittently emit light; and a second focus detection process that causes the focus detector to perform the focus detection with the focus element being moved while causing the light emitter to intermittently emit the light.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an image-capturing apparatus using anassist light in focus detection using an image sensor.

Description of the Related Art

An image-capturing apparatus performing focus detection by a so-calledimaging-surface phase difference detection method using an image sensoris disclosed in Japanese Patent Laid-Open No. 2014-182360. A methodperforming focus detection using an assist light emitted toward anobject in a case where it is difficult to perform the focus detectionbecause the object is dark or the like is disclosed in Japanese PatentLaid-Open No. 6-94988.

However, using the assist light enables the focus detection while theassist light is emitted. Thus, in a case where the focus detection usingthe assist light fails due to some reasons, it is necessary to againemit the assist light to perform the focus detection. Japanese PatentLaid-Open No. 2014-182360 discloses a method of performingpupil-division by a microlens provided to each pixel including pairedphotoelectric convertors to produce paired focus detection signals(phase difference image signals). This method only detects a smalldefocus amount because of a short base length between the pairedphotoelectric convertors. Therefore, the focus detection using theassist light is highly likely to fail, which results in increasing thenumber of emissions of the assist light until the focus detectionsucceeds.

SUMMARY OF THE INVENTION

The present invention provides an image-capturing apparatus capable ofperforming a high-speed focus detection using the assist light whilereducing the number of emissions of the assist light.

The present invention provides as an aspect thereof an image-capturingapparatus including an image sensor configured to capture an objectimage formed by an image-capturing optical system, a focus detectorconfigured to perform focus detection using output from the imagesensor, and a controller configured to cause the focus detector toperform the focus detection and configured to control emission of alight emitter for illuminating an object and movement of a focus elementfor focusing. The controller is configured to selectively perform afirst focus detection process that causes the focus detector to performthe focus detection with the focus element being stopped while causingthe light emitter to intermittently emit light, and a second focusdetection process that causes the focus detector to perform the focusdetection with the focus element being moved while causing the lightemitter to intermittently emit the light.

The present invention provides as another aspect thereof a method ofcontrolling an image-capturing apparatus comprising an image sensorconfigured to capture an object image formed by an image-capturingoptical system, and a focus detector configured to perform focusdetection using output from the image sensor. The method includes thestep of enabling emission of a light emitter for illuminating an object,the step of enabling movement of a focus element for focusing, and thestep of selectively performing a first focus detection process thatcauses the focus detector to perform the focus detection with the focuselement being stopped while causing the light emitter to intermittentlyemit light, and a second focus detection process that causes the focusdetector to perform the focus detection with the focus element beingmoved while causing the light emitter to intermittently emit the light.

The present invention provides as yet another aspect thereof animage-capturing apparatus including an image sensor configured tocapture an object image formed by an image-capturing optical system, afocus detector configured to perform focus detection using output fromthe image sensor, and a controller configured to cause the focusdetector to perform the focus detection and configured to controlemission of a light emitter for illuminating an object. The controlleris configured to acquire multiple focus detection results by causing thefocus detector to perform multiple focus detections while causing thelight emitter to emit light with mutually different light emissionamounts in the respective focus detections or by setting, in the focusdetection, mutually different gains for signals obtained from the imagesensor, and configured to set, by using the multiple focus detectionresults, a light emission amount of the light emitter or a gain for thesignal from the image sensor for a subsequent focus detection.

The present invention provides as still another aspect thereof animage-capturing apparatus including an image sensor configured tocapture an object image formed by an image-capturing optical system, afocus detector configured to perform focus detection using output fromthe image sensor, and a controller configured to cause the focusdetector to perform the focus detection and configured to controlemission of a light emitter for illuminating an object and movement of afocus element for focusing. The controller is configured to selectivelyperform, when a defocus amount as a focus detection result has a firstreliability, a first focus detection process that causes the focusdetector to perform the focus detection with the focus element beingstopped while causing the light emitter to intermittently emit light,when the defocus amount has a second reliability higher than the firstreliability, a second focus detection process that causes the focusdetector to perform the focus detection with the focus element beingmoved while causing the light emitter to intermittently emit the light,when the defocus amount has a third reliability higher than the secondreliability, a third focus detection process that causes the focusdetector to perform the focus detection while causing the light emitterto intermittently emit the light, and when a number of intermittentemissions of the light emitter is a predetermined number or more and thedefocus amount has the second reliability, a fourth focus detectionprocess that causes the focus detector to perform the focus detectionwith the focus element being moved.

The present invention provides as yet another aspect thereof a method ofcontrolling an image-capturing apparatus comprising an image sensorconfigured to capture an object image formed by an image-capturingoptical system, and a focus detector to perform focus detection usingoutput from the image sensor. The method includes the step of enablingemission of a light emitter for illuminating an object, the step ofenabling movement of a focus element for focusing, and the step ofselectively performing, when a defocus amount as a focus detectionresult has a first reliability, a first focus detection process thatcauses the focus detector to perform the focus detection with the focuselement being stopped while causing the light emitter to intermittentlyemit light, when the defocus amount has a second reliability higher thanthe first reliability, a second focus detection process that causes thefocus detector to perform the focus detection with the focus elementbeing moved while causing the light emitter to intermittently emit thelight, when the defocus amount has a third reliability higher than thesecond reliability, a third focus detection process that causes thefocus detector to perform the focus detection while causing the lightemitter to intermittently emit the light, and when a number ofintermittent emissions of the light emitter is a predetermined number ormore and the defocus amount has the second reliability, a fourth focusdetection process that causes the focus detector to perform the focusdetection with the focus element being moved.

The present invention provides as further another aspect thereof amethod of controlling an image-capturing apparatus comprising an imagesensor configured to capture an object image formed by animage-capturing optical system, and a focus detector configured toperform focus detection using output from the image sensor. The methodincludes the step of enabling emission of a light emitter forilluminating an object, the step of acquiring multiple focus detectionresults by causing the focus detector to perform multiple focusdetections while causing the light emitter to emit light with mutuallydifferent light emission amounts in the respective focus detections orby setting, in the focus detection, mutually different gains for signalsobtained from the image sensor, and the step of setting, by using themultiple focus detection results, a light emission amount of the lightemitter or a gain for the signal from the image sensor for a subsequentfocus detection.

The present invention provides as yet further another aspect thereof anon-transitory computer-readable storage medium for storing a computerprogram causing a computer to execute a control process for controllingan image-capturing apparatus. The control process is according to anyone of the above-described methods.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of animage-capturing apparatus that is Embodiment 1 of the present invention.

FIGS. 2A to 2C respectively illustrate a pixel circuit, a pixelarrangement and a sensor circuit of an image sensor used in theimage-capturing apparatus of Embodiment 1.

FIGS. 3A and 3B illustrate pupil division in the image-capturingapparatus of Embodiment 1.

FIG. 4 illustrates focus detection areas provided in an image-capturingarea in Embodiment 1.

FIG. 5 illustrates paired focus detection signals obtained in the focusdetection area in Embodiment 1.

FIG. 6 illustrates a flowchart of an image-capturing control processperformed in Embodiment 1.

FIG. 7 illustrates a flowchart of a focusing process performed inEmbodiment 1.

FIG. 8 illustrates a detectable defocus amount range in Embodiment 1.

FIG. 9 illustrates a table of detectable defocus amounts in Embodiment1.

FIG. 10 illustrates a flowchart of an image-capturing process performedin Embodiment 1.

FIG. 11 illustrates a flowchart of an AF assist light necessitydetermination process performed in Embodiment 1.

FIG. 12 illustrates a flowchart of an LED focusing process performed inEmbodiment 1.

FIG. 13 illustrates a flowchart of an LED/flash focusing processperformed in Embodiment 1.

FIG. 14 illustrates a flowchart of an object presence determinationprocess performed in Embodiment 1.

FIG. 15 illustrates positions of a focus lens in focusing.

FIGS. 16A and 16B illustrate a flowchart of the flash focusing processperformed in Embodiment 1.

FIG. 17 illustrates a flowchart of a flash focus detection and lightemission amount control process performed in Embodiment 1.

FIG. 18 illustrates a flowchart of a lens drive flash light emissioncondition setting process performed in Embodiment 1.

FIG. 19 illustrates a flowchart of a lens drive flash focus detectionprocess performed in Embodiment 1.

FIG. 20 illustrates a flowchart of an LED/flash focusing processperformed in Embodiment 2 of the present invention.

FIGS. 21A and 21B illustrate a flowchart of the flash assist lightfocusing process performed in Embodiment 2.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the present invention will hereinafter bedescribed with reference to the accompanying drawings.

Embodiment 1

FIG. 1 illustrates the configuration of a camera system including animage-capturing lens (interchangeable lens) 300 and a camera body(hereinafter simply referred to as a camera) 100 as an image-capturingapparatus that is a first embodiment (Embodiment 1) of the presentinvention and to which the image-capturing lens 300 is interchangeably(detachably) attached. Description will be first made of theconfiguration of the camera 100.

The camera 100 has a camera mount 106 to which a lens mount 306 of theinterchangeable lens 300 is mechanically and electrically detachablyattached. The camera mount 106 and the lens mount 306 are provided withconnectors 122 and 322 as electrical contact portions for enablingelectrical connection between the image-capturing lens 300 and thecamera 100.

A light flux from an object enters the image-capturing lens 300, passesthrough an image-capturing optical system in the image-capturing lens300, and then is reflected upward by a main mirror 130 to enter anoptical viewfinder 104. The optical viewfinder 104 enables therethrougha user to observe an object image as an optical image of the object. Theoptical viewfinder 104 includes thereinside a part of a display unit 54,which will be described later. The display unit 54 displays focusdetection areas, an in-focus state, a hand jiggling warning, an aperturevalue and an exposure correction value.

The main mirror 130 is a half mirror. A part of the light flux reachingthe main mirror 130 disposed in an image-capturing optical path from theimage-capturing lens 300 passes through the main mirror 130 and isreflected downward by a sub mirror 131 disposed at the back of the mainmirror 130 to be introduced to a focus detection unit 105.

The focus detection unit 105 is constituted by a secondary image-formingoptical system and photoelectric convertors and performs focus detectionby a phase difference detection method. The focus detection unit 105converts, by the photoelectric convertors forming paired line sensors,paired object images formed by the secondary image-forming opticalsystem into paired electrical signals (paired phase difference imagesignals as focus detection signals) to output them to an AF (autofocus)calculator 42. The AF calculator 42 as a focus detector calculates aphase difference that is a shift amount between the paired phasedifference image signals.

A system controller 50 as a controller calculates, from the calculatedphase difference, a defocus amount as a focus detection result. A focuscontroller 342 in the image-capturing lens 300 performs a focusingprocess to move a focus lens 311 as a focus element included in theimage-capturing optical system in a direction in which its optical axisextends (hereinafter referred to as “an optical axis direction”) so asto decrease the defocus amount. Although in this embodiment focusing isperformed by moving the focus lens 311 in the image-capturing opticalsystem, the focusing may be performed by moving the image sensor 14 as afocus element in the optical axis direction.

When image capturing of a still image, an electronic viewfinder image ora moving image is performed after the focusing of the image-capturinglens 300, a quick-return mechanism causes the main and sub mirrors 130and 131 to move outside the image-capturing optical path. Thereby, thelight flux from the image-capturing lens 300 enters the image sensor 14through a mechanical shutter 12 that controls an exposure amount of theimage sensor 14.

The image sensor 14 is constituted by a photoelectric conversion elementsuch as a CMOS sensor and captures (photoelectrically converts) anobject image formed by the light flux from the image-capturing lens 300.After the image capturing, the quick-return mechanism causes the mainand sub mirrors 130 and 131 to move inside the image-capturing opticalpath.

An electrical signal (analog image-capturing signal) produced byphotoelectric conversion by the image sensor 14 is converted by an A/Dconverter 16 into a digital image-capturing signal. A timing generator18 is controlled by a memory controller 22 and the system controller 50to supply a clock signal and control signals to the image sensor 14, theA/D converter 16 and a D/A converter 26. An image processor 20 performs,on the digital image-capturing signal from the A/D converter 16 or thememory controller 22, image processes such as a pixel interpolationprocess and a color conversion process to produce image data. The imageprocessor 20 further performs various calculation processes using theproduced image data.

The image sensor 14 includes, as its all pixels or a part thereof,pixels used for focus detection by an imaging-surface phase differencedetection method. The image processor 20 converts, in the produced imagedata, partial image data corresponding to a focus detection area, whichwill be described later, into focus detection data. The focus detectiondata is sent to the AF calculator 42 through the system controller 50.The AF calculator 42 causes the focus controller 342 in theimage-capturing lens 300 to move the focus lens 311 to obtain anin-focus state.

In the camera 100 of this embodiment, the system controller 50 canproduce, from the image data produced by the image processor 20, acontrast evaluation value that indicates a contrast state of the imagedata. The system controller 50 further can cause the focus controller342 to move the focus lens 311 to a position where the contrastevaluation value becomes peak to obtain an in-focus state. This is an AFby a contrast detection method.

Thus, in an optical viewfinder observation state where the main and submirrors 130 and 131 are disposed inside the image-capturing opticalpath, an AF by the phase difference detection method (that is, a phasedifference AF) is performed. On the other hand, in an electronicviewfinder observation state and a moving image-capturing state wherethe main and sub mirrors 130 and 131 are disposed outside theimage-capturing optical path, an AF by the imaging-surface phasedifference detection method (that is, an imaging-surface phasedifference AF) and an AF by the contrast detection method (that is, acontrast AF), which use the image sensor 14, are performed.

The memory controller 22 controls the A/D converter 16, the timinggenerator 18, the image processor 20, an image display memory 24, theD/A converter 26, a memory 30 and a compressor-decompressor 32. Asdescribed above, the image data is produced by the image processor 20 towhich the digital image-capturing data is input from the A/D converter16. The image data is written to the image display memory 24 or thememory 30 through the memory controller 22. The digital image-capturingdata from the A/D converter 16 may be directly written to the imagedisplay memory 24 or the memory 30 through the memory controller 22.

An image display unit 28 includes a display device such as a liquidcrystal monitor. The image data written to the image display memory 24is converted by the D/A converter 26 into analog image data, and theanalog image data is displayed by the image display unit 28. The imagedisplay unit 28 sequentially displaying the image data (frame images)sequentially produced by image capturing provides a live-view image asthe electronic viewfinder image.

The memory 30 stores still images and moving images produced by imagecapturing. The memory 30 is also used as a working area for the systemcontroller 50. The compressor-decompressor 32 has a function ofcompressing and decompressing the image data by an ADCT (AdaptiveDiscrete Cosine Transform) or the like, reads the image data stored inthe memory 30 and performs thereon a compression process or adecompression process to write the processed image data to the memory30.

A shutter controller 36 uses photometry information from a photometer 46to control the shutter 12 in cooperation with a stop controller 344 thatdrives an aperture stop 312 in the image-capturing lens 300. A camerainterface 38 enables, through the connectors 122 and 322 and a lensinterface 338, communication of control signals, status signals andvarious data between the camera 100 and the image-capturing lens 300.The camera interface 38 further enables power supply from the camera 100to the image-capturing lens 300. The photometer 46 that receives thelight flux passing through the image-capturing lens 300, reflected bythe main mirror 130 and then passing through a photometry lens (notillustrated) performs an AE (autoexposure) process to measure aluminance of the object image. The photometer 46 also performs a lightemission amount control process in cooperation with a flash unit 48. Theflash unit 48 as a first light emitter that emits light toward theobject has a function of emitting a flash light to brightly illuminatethe object in still image capturing and a function of intermittentlyemitting an AF assist light (hereinafter referred to as “a flash assistlight”) to illuminate the object in focus detection. Instead of thephotometer 46 performing the AE process, the system controller 50 mayperform an AE control using a calculation result of a luminance of theimage data produced by the image processor 20 on the shutter controller36 in the camera 100 and the stop controller 344 in the image-capturinglens 300.

An LED lamp 49 as a second light emitter is a light source capable ofconstantly emitting (continuously emitting) an LED light forilluminating the object. The LED light emitted from the LED lamp 49 isused not only as an AF assist light (hereinafter referred to as “an LEDassist light”), but also as light for reducing a so-called red-eyephenomenon and as an index indicating an image-capturing time inself-timer image capturing.

The system controller 50 controls the entire operations of the camera100. A memory 52 stores constants, variables and computer programs usedfor operations of the system controller 50. Another part of the displayunit 54 including a display device such as a liquid crystal displaypanel or an LED and a speaker displays operation statues and messagesusing characters, images or sounds. Specifically, the display unit 54displays information on the number of images such as captured images andremaining capturable images, information on image-capturing conditionssuch as a shutter speed, the aperture value, the exposure correctionvalue and emission or non-emission of the flash light, information on aremaining battery level, and date and time information. As describedabove, the part of the display unit 54 is provided inside the opticalviewfinder 104.

A non-volatile memory 56, which is an EEPROM or the like, is anelectrically writable and erasable memory. A mode dial 60, shutterswitches (SW1 and SW2) 62 and 64, an image display ON/OFF switch 66, aquick-review ON/OFF switch 68 and an operation unit 70 are operated bythe user to input various operation instructions to the systemcontroller 50. The operation unit 70 includes a switch, a dial, a touchpanel, an eye-gaze pointing device, a vocal recognition device andothers.

A power controller 80 includes a battery detector, a DC/DC converter anda switch for switching an electrically energized block. The powercontroller 80 detects, through the battery detector, insertion ornon-insertion of a battery, a type of the inserted battery and aremaining battery level, and controls the DC/DC converter depending onresults of the above detections and instructions from the systemcontroller 50 to supply required voltages to various blocks including arecording medium 200 for required time periods. Connectors 82 and 84connect a power source 86 such as a primary battery (for example, analkaline battery and a lithium battery), a secondary battery (forexample, a NiCd battery, a battery and a lithium-ion battery) or an ACadapter to the camera 100.

An interface 90 has a function of connecting the recording medium 200such as a memory card or a hard disc to the camera 100 through aconnector 92 to which the recording medium 200 is physically connected.A recording medium attachment detector 98 detects that the recordingmedium 200 is connected to the connector 92.

Next, description will be made of the configuration of theimage-capturing lens 300. The image-capturing lens 300 includes theimage-capturing optical system constituted by a magnification-varying(zoom) lens 310 and the above-described focus lens 311 and aperture stop312. A zoom controller 340 moves the zoom lens 310 in the optical axisdirection to perform variation of magnification. The focus controller342 moves the focus lens 311 in the optical axis direction to performfocusing. The stop controller 344 drives the aperture stop 312 dependingon the photometry information received from the photometer 46 throughthe system controller 50.

A lens controller 346 controls the entire operations of theimage-capturing lens 300. The lens controller 346 has a function ofstoring constants, variables and computer programs used for operationsof the lens controller 346.

A non-volatile memory 348 stores identification information such as aunique product serial number of the image-capturing lens 300, opticalinformation such as a full-open aperture value, a minimum aperture valueand a focal length, and information on various current and previoussetting values. The non-volatile memory 348 further stores frameinformation depending on the state of the image-capturing lens 300, anddefocus related information. The frame information relates to “frames”that define a diameter of the light flux passing through theimage-capturing lens (image-capturing optical system) 300. Specifically,the frame information includes distances of the “frames” from the imagesensor 14 and radii of apertures of the “frames” through which the lightflux passes. One of the “frames” is the aperture stop 312, and lensholders holding lenses constituting the image-capturing optical systemare the other “frames”. The “frames” depend on a position of the zoomlens 310 (that is, a zoom position) and a position of the focus lens 311(that is, a focus position), so that the frame information is providedfor each zoom position and each focus position. In the focus detection,the lens controller 346 selects proper frame information correspondingto the zoom and focus positions and sends the selected frame informationto the system controller 50.

The defocus related information indicates defocus amounts for respectiveobject distances from an end on an infinite side (infinite end) to anend on a close side (close end), and is stored dividedly for therespective object distances corresponding to the focus positions.

Next, description will be made of a structure of the image sensor 14with reference to FIGS. 2A to 2C. FIG. 2A illustrates a structure of onepixel 200 of the image sensor 14. The pixel 200 includes two photodiodes(PD) 201 a and 201 b that are paired photoelectric convertors, transferswitches 202 a and 202 b, a floating diffusion area 203, an amplifier204, a reset switch 205 and a selection switch 206. Each switch isconstituted by a MOS transistor or the like. In the followingdescription, as an example, each switch is constituted by an N-type MOStransistor. However, each switch may be constituted by a P-type MOStransistor or any one of other switching elements. Furthermore, thenumber of photodiodes included in the pixel 200 may be three or more(for example, four).

The photodiodes 201 a and 201 b each receive light passing through acommon microlens 201 c to photoelectrically convert the light intoelectrical charges corresponding to an amount of the received light. Inthe following description, a signal obtained from the electrical chargesgenerated by the photodiode 201 a is referred to as an A signal, and asignal obtained front the electrical charges generated by the photodiode201 b is referred to as a B signal.

The transfer switch 202 a is connected between the photodiode 201 a andthe floating diffusion area 203, and the transfer switch 202 b isconnected between the photodiode 201 b and the floating diffusion area203. The transfer switches 202 a and 202 b respectively transfer theelectrical charges generated by the photodiodes 201 a and 201 b to thecommon floating diffusion area 203. The transfer switches 202 a and 202b are respectively controlled by control signals TX_A and TX_B.

The floating diffusion area 203 temporarily holds the electrical chargestransferred from the photodiodes 201 a and 201 b, and converts the heldelectrical charges into voltage signals. The amplifier 204 isconstituted by a source follower MOS transistor 204. The amplifier 204has a gate connected to the floating diffusion area 203, and has a drainconnected to a common power source 208 that supplies a power sourcepotential VDD. The amplifier 204 amplifies the voltage signal obtainedfrom the electrical charges held by the floating diffusion area 203 tooutput the amplified voltage signal.

The reset switch 205 is connected between the floating diffusion area203 and the common power source 208. The reset switch 205 is controlledby a control signal RES to reset a potential in the floating diffusionarea 203 to the power source potential VDD.

The selection switch 206 is connected between a source of the amplifier204 and a vertical output line 207. The selection switch 206 iscontrolled by a control signal SEL to output the amplified voltagesignal to the vertical output line 207.

FIG. 2C illustrates a circuit configuration of the image sensor 14. Theimage sensor 14 includes a pixel array 234, a vertical scanning circuit209, a current source load 210, read-out circuits 235, common outputlines 228 and 229, a horizontal scanning circuit 232 and a dataoutputter 233.

The pixel array 234 includes multiple pixels 200 arranged in matrix.FIG. 2C simply illustrates horizontal n×vertical four pixels of all thepixels 200. Each pixel 200 is provided with one of color filters ofmultiple colors. FIG. 2C exemplary illustrates color filters of red (R),green (G) and blue (B). All the pixels (n rows×m columns) 200 providedwith these color filters are arranged in a Bayer arrangement.

The image sensor 14 further has an area (OB) in which a part of thepixel array 234 is shielded by a light-shielding layer.

The vertical scanning line 209 outputs control signals, through drivesignal lines 208 provided for the respective pixel rows, to the pixels200 in the respective pixel rows. Although FIG. 2C illustrates one drivesignal line 208 for each pixel row, multiple drive signal lines areprovided for each pixel row in reality.

The pixels 200 in the same pixel row are commonly connected to thevertical output line 207 provided for each pixel row. An output signalfrom each pixel 200 is input to the read-out circuit 235 through thevertical output line 207, and is processed by the read-out circuit 235.The current source load 210 is connected to the vertical output lines207 for the respective pixel rows.

The horizontal scanning circuit 232 sequentially outputs control signalsHSR(0) to HRS(n−1) to sequentially select, out of the multiple read-outcircuits 235, one read-out circuit 235 from which the output signal isoutput. The selected read-out circuit 235 outputs a processed outputsignal to an output amplifier 233 through the common output lines 228and 229.

Description will be made of a specific configuration of the read-outcircuit 235. The read-out circuit 235 includes a clamp capacitor 211,feedback capacitors 214 to 216, and an operational amplifier 213, areference voltage source 212 and switches 217 to 220. The read-outcircuit 235 further includes a comparator 221, a Latch_N 222, a LatchS_223 and switches 226 and 227.

The output signal input to the read-out circuit 235 through the verticaloutput line 207 is input to an inverting input terminal of theoperational amplifier 213 through the clamp capacitor 211. Anon-inverting input terminal of the operational amplifier 213 receives areference voltage Vref supplied from the reference voltage source 212.The feedback capacitors 214 to 216 are connected between the invertinginput terminal and an output terminal of the operational amplifier 213.The switch 217 is also connected between the inverting input terminaland an output terminal of the operational amplifier 213 to short bothends of the feedback capacitors 214 to 216. The switch 217 is controlledby a control signal RES_C. The switches 218 to 220 are respectivelycontrolled by control signals GAIN0 to GAIN2.

The comparator 221 is connected to the output terminal of theoperational amplifier 213 and an output terminal of a ramp signalgenerator 230 that outputs a ramp signal 224. The Latch_N 222 is astorage element for holding a noise level IN signal). The Latch_S 223 isa storage element for holding levels (S signal) of the A signal and anAB signal produced by adding the A signal and the B signal. An outputsignal from the output terminal of the comparator 221 and a count value225 output from a counter 231 are input to each of the Latch_N 222 andthe Latch_S 223. The Latch_N 222 and the Latch_S are respectivelycontrolled by control signals LATEN_N and LATEN_S. Output terminals ofthe Latch_N 222 and the Latch_S are respectively connected to the commonoutput lines 228 and 229 through the switches 226 and 227. The commonoutput lines 228 and 229 are connected to the data outputter 233.

The switches 226 and 227 are controlled by the control signal HSR(h)from the horizontal scanning circuit 232. The symbol h represents acolumn number of the read-out circuit 235 to which a control signal lineis connected. The signals held by the Latch_N 222 and the Latch_S areoutput to the data outputter 233 respectively through the common outputlines 228 and 239, and then output from the data outputter 233 to anoutside.

In this embodiment, the image sensor 14 has a first read-out mode and asecond read-out mode. In the first read-out mode, an all pixel read-outis performed in which the output signals from all the pixels 200 of theimage sensor 14 are read out so as to capture a high-definitionrecording still image. In the second read-out mode, a decimationread-out is performed in which the output signals from a part of all thepixels 200 are read out so as to display a live-view image and arecording moving image each whose number of pixels is less than that ofthe recording still image. Since the number of pixels required forproducing the live-view image and the recording moving image is lessthan a whole pixel number, reading out the output signals from thepixels whose number is horizontally and vertically decimated at apredetermined ratio from all the pixels of the image sensor 14 reduces asignal processing load and contributes reduction of power consumption.In both the first and second read-out modes, the output signals from thepaired photoelectric convertors in each pixel can be individually readout, so that the paired phase difference image signals can be produced.

FIGS. 3A and 3B illustrate a conjugate relation between, in the camerasystem of this embodiment, an exit pupil (exit pupil plane) of theimage-capturing optical system and the paired photoelectric convertors201 a and 201 b of a pixel (hereinafter referred to as a center pixel)200 disposed near an image height of 0 in the image sensor 14, that is,near a center of an image plane. The exit pupil plane of theimage-capturing optical system and the paired photoelectric convertors201 a and 201 b are arranged in conjugate relation by the micro lens 201c. The exit pupil of the image-capturing optical system is located in aplane at which the aperture stop 312 is disposed.

The image-capturing optical system of this embodiment has a zoomingfunction, and thus an exit pupil distance from the image plane to theexit pupil is changed with zooming. The image-capturing optical systemillustrated in FIG. 3A is in an intermediate zoom state where its focallength is an intermediate length between a wide-angle end and atelephoto end. With this intermediate length being defined as a standardexit pupil distance Zep, an eccentric parameter depending on a shape ofthe micro lens 201 c and an image height (X and Y coordinates) isoptimized.

In FIG. 3A, reference numeral 301 denotes a first lens unit disposed ata most object side position in the image-capturing optical system, andreference numeral 301 b denotes a lens barrel member that holds thefirst lens unit 301. Reference numeral 311 b denotes a lens barrelmember that holds the focus lens 311. Reference numeral 312 a denotes anaperture plate that has an aperture for defining a full-open aperturediameter of the aperture stop 312, and reference numeral 312 b denotes astop blade that changes a narrowed aperture diameter of the aperturestop 312. In FIG. 3A, the lens barrel member 301 b, the aperture plate312 a and the stop blade 312 b, which are members that restrict thelight flux passing through the image-capturing optical system, areillustrated as optical virtual images viewed from the image plane. Asynthetic aperture near the aperture stop 312 is defined as the exitpupil of the image-capturing optical system (hereinafter referred to as“a lens exit pupil”). As described above, the distance from the imageplane to the lens exit pupil is represented by Zep.

The paired photoelectric convertors 201 a and 201 b included in thecenter pixel 200 is reversely projected as images EP1 a and EP1 b on thelens exit pupil by the microlens 201 c. In other words, mutuallydifferent pupil areas (hereinafter referred to as “focus detectionpupils) EP1 a and EP1 b in the lens exit pupil is projected ontosurfaces of the paired photoelectric convertors 201 a and 201 b throughthe microlens 201 c. The center pixel 200 includes, in order from itslowest layer, the photoelectric convertors 201 a and 201 b, wiringlayers 201 e to 201 g, a color filter 201 h and the microlens 201 c.

FIG. 3B illustrates reversely-projected images EP1 a and EP1 b of thephotoelectric convertors 201 a and 201 b on the exit pupil plane of theimage-capturing optical system, which are viewed from the optical axisdirection. The image sensor 14 includes pixels capable of outputting theoutput signal from one of the paired photoelectric convertors 201 a and201 b and of adding together the output signals from the pairedphotoelectric convertors 201 a and 201 b to output the added outputsignal. The added output signal is a signal obtained byphotoelectrically converting a whole light flux passing through thefocus detection pupils EP1 a and EP1 b.

In FIG. 3A, a light flux (its outer edge is illustrated by straightlines) L passing through the image-capturing optical system isrestricted by the aperture plate 312 a of the aperture stop 312. Lightfluxes (phase difference images) CLa and CLb from the focus detectionpupils EP1 a and EP1 b reach the center pixel 200 without being blocked.FIG. 3B illustrates a section (outer edge) of the light flux illustratedin FIG. 3A at the exit pupil plane. Most parts of thereversely-projected images EP1 a and EP1 b of the paired photoelectricconvertors 201 a and 201 b are included inside a circular aperture TL ofthe aperture plate 312 a, so that the reversely-projected images EP1 aand EP1 b each include only a small lack (vignetting). The lacks of thereversely-projected images EP1 a and EP1 b are symmetry with respect tothe optical axis (illustrated by a dashed-dotted line) of theimage-capturing optical system, so that amounts of light received by thepaired photoelectric convertors 201 a and 201 b are equal to each other.

As described above, the image sensor 14 has not only the function ofcapturing the object image, but also the function of individuallyreceiving the light fluxes from the mutually different focus detectionpupils in the lens exit pupil to perform the focus detection by theimaging-surface phase difference detection method. Although thisembodiment describes the case where each pixel of the image sensor 14includes the paired photoelectric convertors, the paired photoelectricconvertors may be two focus detection pixels whose mutually differentparts are light-shielded.

FIG. 4 illustrates focus detection areas 401 in an image-capturing frame400.

In this embodiment, the focus detection by the imaging-surface phasedifference detection method is performed at multiple (three) focusdetection areas 401.

In each focus detection area 401, a phase difference is detected using ahorizontal contrast difference.

FIG. 5 exemplary illustrates paired phase difference image signals 430 aand 430 b. The paired phase difference image signals 430 a and 430 b areproduced respectively by combining together the A signals and bycombining together the B signals, the A and B signals being obtainedfrom the pixels in the focus detection area 401 of the image sensor 14,and are subjected to various image processes (corrections) performed bythe image processor 20. The paired phase difference image signals 430 aand 430 b are sent to the AF calculator 42.

In FIG. 5, a horizontal axis indicates a pixel arrangement direction inwhich the A or B signals are combined together, and a vertical axisindicates an intensity of the signal. FIG. 5 illustrates the pairedphase difference image signals 430 a and 430 b in a defocus state(out-of-focus state) where the image-capturing optical system is out offocus for the object. As compared with an in-focus state, the phasedifference image signal 430 a is shifted leftward, and the phasedifference image signal 430 b is shifted rightward. The AF calculator 42performs a correlation calculation on the paired phase difference imagesignals 430 a and 430 b to calculate a shift amount (phase difference)therebetween, and calculates, using the phase difference, a defocusamount of the image-capturing optical system for the object.

The system controller 50 calculates a drive amount of the focus lens 311using information on a focus sensitivity (indicating an image planemovement amount for a unit movement amount of the focus lens 311)received from the lens controller 346 and the defocus amount receivedfrom the AF calculator 42. The system controller 50 further calculates,using information on the position of the focus lens 311 received fromthe lens controller 346 and the calculated drive amount of the focuslens 311, a target position to which the focus lens 311 is moved, andsends the target position to the lens controller 346. The lenscontroller 346 moves the focus lens 311 to the target position throughthe focus controller 342.

Thus, the focusing is performed by the imaging-surface phase differenceAF.

Next, with reference to a flowchart of FIG. 6, description will be madeof an image-capturing control process (control method) in the camera 100of this embodiment. FIG. 6 illustrates the image-capturing controlprocess in a case of performing from a state where the live-view imageis displayed to a state where the still image capturing is performed.The system controller 50 as a computer executes this process accordingto a control program as a computer program. The symbol “S” in thefollowing description represents a step.

First, at S1, the system controller 50 causes the image sensor 14 toperform image capturing for producing the live-view image and to inputthe image-capturing signal to the image processor 20.

Next, at S2, the system controller 50 causes the image processor 20 toproduce, from the image-capturing signal, live-view image data and focusdetection data.

Next, at S3, the system controller 50 causes the image display unit 28to display the live-view image corresponding to the live-view image dataproduced at S2.

The user observing the displayed live-view image can decide animage-capturing composition. The display of the live-view image, whichis used for user's conformation of the image-capturing frame and theimage-capturing conditions, is updated at predetermined intervals suchas 33.3 ms (30 fps) or 16.6 ms (60 fps).

The system controller 50 may stop the display of the live-view image onthe image display unit 28 when the AF assist light is emitted. Forexample, when the above described flash assist light is emitted, apartial area of the object in the live-view image may be saturated inluminance and thereby the live-view image may be degraded. Therefore,when the AF assist light is emitted, it is desirable to stop the displayof the live-view image and to restart it thereafter. On the other hand,the LED assist light can be continuously emitted, so that the live-viewimage can be kept in a proper exposure state. Therefore, it is notnecessary to stop the display of the live-view image. Even when theflash assist light is emitted, as long as the luminance-saturated areaor an amount of the flash light is small, the display of the live-viewimage may be maintained.

Next, at S4, the system controller 50 (AF calculator 42) performs afocus detection process using the focus detection data obtained from thethree focus detection areas 401 illustrated in FIG. 4. That is, the AFcalculator 42 performs the focus detection process that calculates thephase difference between the paired phase difference image signalsillustrated in FIG. 5 and calculates the defocus amount from the phasedifference.

Next, at S5, the system controller 50 detects ON or OFF of the switchSW1 as an image-capturing preparation instructing switch. The switch SW1is turned on by a user's half-press operation of a release(image-capturing trigger) switch included in the operation unit 70. Ifthe switch SW1 is ON, the system controller 50 proceeds to S6. If theswitch SW1 is OFF, the system controller 50 proceeds to S10.

At S10, the system controller 50 determines whether a main (power)switch is turned off. If the main switch is not turned off, the systemcontroller 50 returns to S2. If the main switch is turned off, thesystem controller 50 ends this process.

At S6, the system controller 50 acquires a focus detection area mode.

As the focus detection area mode, the camera 100 has a user selectionmode, an automatic selection mode and an object detection mode. The userselection mode is a mode that sets one or more focus detection areasaccording to user's selection. The automatic selection mode is a mode inwhich the system controller 50 selects one or more focus detectionareas. The object detection mode is a mode in which the systemcontroller 50 detects a specific object such as a person's face to setone or more focus detection areas including the specific object. At S6,the system controller 50 further acquires information on a preset focusdetection area mode and object detection information indicating theabove specific object to set the number of focus detection areas (one ormore), and position(s) and an arrangement thereof.

Next, at S7, the system controller 50 (AF calculator 42) performs afocusing process at the focus detection area 401 set according to thefocus detection area mode acquired at S6. The focusing process will bedescribed in detail. After the focusing process at S7, the systemcontroller 50 proceeds to S8.

At S8, the system controller 50 detects ON or OFF of the switch SW2 asan image-capturing starting switch. The switch SW2 is turned on by auser's full-press operation of the release switch. If the switch SW2 isOFF, the system controller 50 waits for ON of SW2. If the switch SW2 isON, the system controller 50 proceeds to S9.

At S9, the system controller 50 performs an image-capturing process. Theimage-capturing process will be described in detail. After theimage-capturing process at S9, the system controller 50 proceeds to S10.

Next, with reference to a flowchart of FIG. 7, description will be madeof the focusing process performed at S7 in FIG. 6. The system controller50 having started the focusing process acquires at S201 the defocusamount as a result of the focus detection performed at S4. The systemcontroller 50 further determines whether the acquired defocus amount hasa high reliability.

If the defocus amount has a high reliability, the system controller 50proceeds to S202.

The system controller 50 determines the reliability by using a localminimal value of a correlation amount between the paired phasedifference image signals and a difference amount of the correlationamounts obtained near the shift amount at which the correlation amountbecomes the local minimal value in the correlation calculation.

The correlation amount indicates a correlation degree between the pairedphase difference image signals. A smaller correlation amount indicates ahigher correlation.

In other words, as the local minimal value of the correlation amountbecomes smaller, the reliability becomes higher. The system controller50 determines that, if the local minimal value of the correlation amountis smaller than a threshold Thr1, the reliability is high. The localminimal value of the correlation amount ideally becomes 0 when shapes ofthe paired phase difference image signals are completely identical toeach other. However, actual paired phase difference image signals havemutually different shapes due to influences of a diffusioncharacteristic of light from the object, a light amount control errorand a noise generated in each pixel. Therefore, the local minimal valueof the correlation amount is typically a positive value. On the otherhand, as a difference between the shapes of the paired phase differenceimage signals increases, a detection accuracy of the local minimal valuebecomes lower, which results in decrease in accuracy of the focusdetection.

As the difference amount of the correlation amounts obtained near theshift amount at which the correlation amount becomes the local minimalvalue becomes larger, the shift amount can be more accuratelycalculated. The reason for this is that a larger difference of thecorrelation amounts reduces an influence of variation of the correlationamount due to errors on the detection of the shift amount. Thus, thesystem controller 50 determines that, if the difference amount of thecorrelation amounts is larger than a threshold Thr2, the reliability ishigh (that is, the reliability is a first reliability).

At S202, the system controller 50 determines whether a defocus amountwhose reliability is high has been detected in each focus detection areaset according to the focus detection area mode acquired at S6. If thedefocus amount whose reliability is high has been detected in each setfocus detection area, the system controller 50 proceeds to S203. Thereason for proceeding from S202 to S203 only when the defocus amountwhose reliability is high has been detected in each set focus detectionarea is that the reliability may become high in any of the focusdetection areas due to emission of the AF assist light. The systemcontroller 50 attempts the focus detection using the AF assist lightwhen the reliability is low in any set focus detection area. However,when the number of focus detection areas is large, it is unnecessary touse no AF assist light only when the reliability in each set focusdetection area is high. For example, a determination of using no AFassist light may be made when the reliability is high only in the focusdetection area whose image height is near 0.

At S203, the system controller 50 determines whether the defocus amountdetected in the focus detection area set at S6 indicates an in-focusstate where the detected defocus amount is equal to or less than apredetermined defocus amount or a defocus state where the detecteddefocus amount is larger than the predetermined defocus amount. At thisstep, the system controller 50 selects, among the focus detection areasset according to the focus detection area mode, one focus detection areaaccording to a predetermined algorithm such as a close priorityalgorithm and a center priority algorithm, and compares the defocusamount detected in the selected focus detection area with thepredetermined defocus amount. The system controller 50 having determinedthat the detected defocus amount indicates the defocus state proceeds toS204 to drive the focus lens 311 depending on the detected defocusamount.

On the other hand, the system controller 50 having determined at S203that the detected defocus amount indicates the in-focus state proceedsto S205 to cause the image display unit 28 to perform an in-focusdisplay indicating the in-focus state. For example, the image displayunit 28 displays a specific color frame indicating the focus detectionarea where the in-focus state is obtained, or outputs a sound indicatingthat the in-focus state is obtained.

The system controller 50 having determined at S202 that the defocusamount whose reliability is high has not been detected proceeds to S206to perform a process to determine a necessity of emission of the AFassist light. This AF assist light necessity determination process willbe described later in detail.

Next, at S205, the system controller 50 determines whether a result ofthe determination process at S206 indicates that the AF assist light(that is, the LED assist light or the flash assist light) is necessary.If the AF assist light is not necessary, the system controller 50proceeds to S208.

At S208, the system controller 50 performs a focus detection process(second focus detection process) with the focus lens 311 being moved,that is, with a search drive of the focus lens 311. The focus detectionprocess performed herein is the same as the focus detection processperformed at S4. The system controller 50 having determined at S209, asa result of the focus detection with the search drive at S208, that thefocus detection can be performed proceeds to S203.

On the other hand, the system controller 50 having determined at S209that the focus detection still cannot be performed proceeds to S210 todetermine whether the focus lens 311 is located at its movable end (thatis, at the telephoto end or the wide-angle end) in the optical axisdirection. If the focus lens 311 does not reach the movable end, thesystem controller 50 returns to S208 to continue the focus detectionwith the search drive.

If the focus lens 311 has reached the movable end at S210, the systemcontroller 50 regards an object on which the image-capturing lens 300can be in focus as being not located at a position at which an in-focusstale is obtained in a movable range of the focus lens 311 to proceed toS211.

At S211, the system controller 50 stops the focus detection, and causesthe image display unit 28 to perform an out-of-focus display indicatingthat an in-focus state cannot be obtained.

The system controller 50 having determined at S207 that the AF assistlight is necessary proceeds to S212 to calculate an initial position ofthe focus lens 311 (hereinafter referred to as “a focus initialposition”). Specifically, the system controller 50 acquires focusdetection information described later, and calculates a detectabledefocus amount that is an estimated defocus amount detectable using thefocus detection information. The system controller 50 furthercalculates, from the detectable defocus amount and information on anobject distance at the close end of the image-capturing lens 300, thefocus initial position that can cover an object distance range as wideas possible including the close end (that can widen a defocus rangewhere the defocus amount whose reliability is high can be calculated).

FIG. 8 illustrates the focus initial position. In FIG. 8, a horizontalaxis indicates focus positions corresponding to in-focus objectdistances. FIG. 8 further illustrates a range of the calculateddetectable defocus amount (hereinafter referred to as “a defocus amountdetectable range”) by an arrow. The focus initial position is set in thedefocus amount detectable range including the close end that is themovable end of the focus lens 311 such that the defocus amountdetectable range extends toward a far distance side from the close end.

The reason for setting the focus initial position in the defocus amountdetectable range including the close end is that the object distance atwhich the AF assist light reaches and thereby the focus detection isenabled is a close distance. Therefore, the focus initial position isnot limited to the close end, and can be calculated depending on apreset object distance at which an object is likely to be located, suchas a distance corresponding to a constant multiple of the focus lengthor 1 m, Setting the object distance such as the distance correspondingto the constant multiple of the focus length or 1 m, which is not theclose end, generates a case where the focus detection cannot beperformed on a closer object. In this case, however, a far distance sideobject distance range may be set to a range where the focus detectioncan be made.

Furthermore, a method may be employed which sets a flash assist lightreaching distance where the flash assist light as the AF assist lightreaches and sets the focus initial position in a range whose fardistance side end corresponds to the flash assist light reachingdistance. Thereby, it is possible to limit the object distance at whichthe focus detection can be performed, so that a more proper focusinitial position having a margin can be set.

The focus detection information is information on the focus detectionfor roughly calculating the detectable defocus amount, and isinformation on at least one of an F-number of the image-capturing lens300, the above-described frame information, an image height of the focusdetection area and a contrast of the phase difference image signal.Using the F-number of the image-capturing lens 300, the frameinformation and the image height of the focus detection area enablescalculating a base length between the paired photoelectric convertorsthat perform the focus detection (that is, a distance between centroidsof the focus detection pupils) and an AF light flux diameter (a rangethrough which the light flux forming the phase difference image passesin the focus detection pupil). As the base length becomes longer, ashift amount between the paired phase difference image signals per aunit defocus amount becomes larger, so that the focus detection can beperformed with a higher accuracy. As the AF light flux diameter becomessmaller, the phase difference image signal becomes less likely to beblurred, so that the shift amount between the paired phase differenceimage signals can be detected even in a state where the defocus amountis large. As the AF light flux diameter increases, the base lengthbecomes longer.

Moreover, the detectable defocus amount changes depending on an object'scontrast, an object's spatial frequency characteristic and others. Foran object having more information of a higher spatial frequency andhaving a higher contrast, the focus detection can be made in a statewhere the defocus amount is larger. As information on the object'scontrast, for example, a sum of squares of differences between mutuallyadjacent pixel signals in the phase difference image signal may be used.

The system controller 50 stores a data table including data of thedetectable defocus amounts corresponding to the above-described focusdetection information. FIG. 9 illustrates the data table of thedetectable defocus amounts. As described above, the system controller 50calculates, as the focus detection information, the AF light fluxdiameter and the object's contrast, and acquires the detectable defocusamount from the data table illustrated in FIG. 9.

The flash assist light reaching distance may be also changed dependingon the AF light flux diameter. As the AF light flux diameter decreases,the flash assist light reaching distance becomes shorter. This enablessetting a more proper focus initial position.

The system controller 50 having calculated the focus initial position atS212 proceeds to S213 to move the focus lens 311 to the calculated focusinitial position.

Next, at S214, the system controller 50 determines whether only emissionof the LED assist light is allowed. In this embodiment, the systemcontroller 50 controls the flash unit 48 and the LED lamp 49, which arethe light emitters each emitting the AF assist light. If only theemission of the LED assist light is allowed (that is, emission of theflash assist light is prohibited), the system controller 50 proceeds toS215 to perform a focusing process with only the LED assist light beingemitted from the LED lamp 49. This focusing process with only the LEDassist light is hereinafter referred to as “an LED focusing process”. Onthe other hand, if the emission of the flash assist light is allowed,the system controller 50 proceeds to S216 to perform a focusing processwith the LED assist light or the flash assist light being emitted fromthe LED lamp 49 or the flash unit 48. This focusing process with the LEDor flash assist light is hereinafter referred to as “an LED/flashfocusing process”. These focusing processes will be described later indetail. The system controller 50 having finished the LED focusingprocess at S215 or the LED/flash focusing process at S216 ends thefocusing process.

Next, with reference to a flowchart of FIG. 10, description will be madeof the image-capturing process performed at S9 in FIG. 6. First, atS301, the system controller 50 drives the aperture stop 312 for lightamount control and drives the shutter 12 for exposure time control. Whenperforming image capturing with the flash light being emitted from theflash unit 48, the system controller 50 drives the shutter 12 insynchronization with that flash light emission.

Next, at S302, the system controller 50 performs the all pixel read-outfor still image capturing.

Next, at S303, the system controller 50 (image processor 20) performs adefective pixel interpolation process on the image-capturing signal readout from the image sensor 14. The defective pixel interpolation processis performed using prestored information on positions of defectivepixels. The defective pixel includes a pixel whose output offset or gainis significantly different from that of other pixels and a pixel that isnot used for image capturing (for example, the above-described focusdetection pixel).

Next, at S604, the system controller 50 performs, on the image-capturingsignal, image processes such as γ-correction, color conversion and edgeenhancement to produce captured image data (still image data). Then, atS305, the system controller 50 records the captured image data to thememory 30.

Next, at S306, the system controller 50 records characteristicinformation of the camera 100 in correspondence with the captured imagedata recorded at S305 to a memory in the system controller 50. Thecharacteristic information of the camera 100 includes information on,for example, an exposure dime, an image development process, alight-receiving sensitivity of the pixel of the image sensor 14 andvignetting of an image-capturing light flux in the camera 100. Thelight-receiving sensitivity of the pixel depends on the microlens 201 cand the photodiodes 201 a and 201 b, so that information on theirstructures (such as a size or a pitch of the photodiodes 201 a and 201 band a distance from the microlens 201 c to the photodiodes 201 a and 201b) may be recorded as the characteristic information of the camera 100.The characteristic information of the camera 100 further includesinformation on a distance from a mount surface between the camera 100and the image-capturing lens 300 to the image sensor 14 and informationon manufacturing errors.

Next, at S307, the system controller 50 records characteristicinformation of the image-capturing lens 300 in correspondence with thecaptured image data recorded at S305 to the memory 30 in the camera 100and the memory in the system controller 50. The characteristicinformation of the image-capturing lens 300 includes information on, forexample, the exit pupil, the frames (frame information), the focallength and F-number in image capturing, aberrations of theimage-capturing optical system and manufacturing errors.

Next, at S308, the system controller 50 records image relatedinformation to the memory 30 in the camera 100 and the memory in thesystem controller 50. The image related information is information onthe captured image data and includes information on, for example, afocus detection operation before image capturing, object's movement andaccuracy of the focus detection operation. The system controller havingfinished the process at S307 proceeds to S10 in FIG. 6.

Next, with reference to a flowchart of FIG. 11, description will be madeof the AF assist light necessity determination process performed at S206in FIG. 7. At S401, the system controller 50 acquires information on thefocus detection area. The information on the focus detection area isinformation on, for example, the number, position(s) and arrangement ofthe focus detection area(s) set according to the focus detection areamode at S6 in FIG. 6.

Next, at S402, the system controller 50 acquires photometry information.The photometry information includes a photometric value in each focusdetection area and a photometric value in an area including all thefocus detection area (s).

Next, at S403, the system controller 50 sets a threshold (hereinafterreferred to as “an LED emission threshold”) for determining the emissionof the LED assist light and a threshold (hereinafter referred to as “aflash light emission threshold”) for determining the emission of theflash assist light. The LED assist light is emitted to a narrow area inthe image-capturing area, but can be continuously emitted, which makesthe focus detection with the AF assist light easy. On the other hand,the flash assist light is emitted to a wide area, but is intermittentlyemitted. Therefore, a large number of its emissions makes it impossibleto provide a required light emission amount for recording imagecapturing. Thus, at S403, the system controller 50 sets the LED andflash light emission thresholds so as to prioritize the emission of theLED assist light over the emission of the flash assist light. However,with consideration of a focus detection error when the LED assist lightis a monochromatic light such as a red light and of vignetting of theLED assist light by the image-capturing lens 300 when the LED lamp 49 isdisposed near the image-capturing lens 300, the system controller 50 mayset the LED and flash light emission thresholds so as to prioritize theemission of the flash assist light over the emission of the LED assistlight.

Next, at S404, the system controller 50 compares the photometric valueindicated by the photometry information acquired at S402 with the LEDemission threshold set at S403. The photometric value compared with theLED emission threshold includes the photometric value in the areaincluding all the focus detection area(s) and the photometric value ineach focus detection area. When any one of the photometric values islower than the LED emission threshold, the system controller 50 proceedsto S405 to determine that the LED emission is ON (that is, to allow theemission of the LED assist light). On the other hand, when any one ofthe photometric values is equal to or higher than the LED emissionthreshold, the system controller 50 proceeds to S406 to determine thatthe LED emission is OFF (that is, to prohibit the emission of the LEDassist light).

Next, at S407, the system controller 50 compares the photometric valueacquired at S402 with the flash light emission threshold set at S403.The photometric value compared with the flash light emission thresholdalso includes the photometric value in the area including all the focusdetection area(s) and the photometric value in each focus detectionarea. When any one of the photometric values is lower than the flashlight emission threshold, the system controller 50 proceeds to S408 todetermine that the flash light emission is ON (that is, to allow theemission of the flash assist light). On the other hand, when any one ofthe photometric values is equal to or higher than the flash lightemission threshold, the system controller 50 proceeds to S409 todetermine that the flash light emission is OFF (that is, to prohibit theemission of the flash assist light). The system controller 50 havingfinished the process at S408 or S409 ends the AF assist light necessitydetermination process.

Next, with reference to a flowchart of FIG. 12, description will be madeof the LED focusing process performed at S215 in FIG. 7. At S501, thesystem controller 50 causes the LED lamp 48 to emit the LED assist lightand to continue the emission of the LED assist light at least until thein-focus state is obtained at S504 described later.

Processes from at next S502 to S510 are the same, as illustrated by stepnumbers in parentheses, as those at S201 to S205 and S208 to S211 inFIG. 7.

Next, with reference to a flowchart of FIG. 13, description will be madeof the LED/Flash focusing process performed at S216 in FIG. 7.

At S601, the system controller 50 determines whether only the emissionof the flash assist light is allowed in the AF assist light necessitydetermination process performed beforehand. If the emission of the LEDassist light is not allowed and the emission of the flash assist lightis allowed, the system controller 50 proceeds to S605. If both theemission of the LED assist light and the emission of the flash assistlight are allowed, the system controller 50 proceeds to S602.

At S602, the system controller 50 performs an object presencedetermination process. As described above, the LED assist light can becontinuously emitted, and however is emitted to the narrow area and islikely to be subjected to the vignetting by the image-capturing lens300. Thus, at S602, the system controller 50 determines whether anobject that effectively receives the LED assist light is present. Thisobject presence determination process will be described later in detail.

Next, at S603, the system controller 50 determines whether adetermination that the object effectively receiving the LED assist lightis present has been made. If the object is present, the systemcontroller 50 proceeds to S604. If the object is not present, the systemcontroller 50 proceeds to S605.

At S604, the system controller 50 performs the same LED focusing processas that performed at S215 in FIG. 7. At S605, the system controller 50performs the flash focusing process. This flash focusing process will bedescribed later in detail. The system controller 50 having finished theprocess at S604 or S605 ends the LED/Flash focusing process.

Next, with reference to a flowchart of FIG. 14, description will be madeof the object presence determination process performed at S602 in FIG.13. At S701, the system controller 50 acquires the photometryinformation in the focus detection area(s). At this step, the systemcontroller 50 acquires the photometric value(s) corresponding to thefocus detection area(s) set at S6 in FIG. 6.

Next, at S702, the system controller 50 causes the LED lamp 48 to emitthe LED assist light. Then, at S703, the system controller 50 againacquires the photometric value(s) corresponding to the focus detectionarea(s).

Next, the system controller 50 causes the LED lamp 48 to stop theemission of the LED assist light. Then, at S705, the system controller50 calculates a change amount from the photometric value acquired beforethe emission of the LED assist light at S701 to the photometric valueacquired during the emission of the LED assist light at S703. The systemcontroller 50 determines whether the object effectively receiving theLED assist light is present by utilizing that the photometric valuechanges due to the presence of the object illuminated with the LEI)assist light. Thus, the system controller 50 can detect a case where theobject is located outside the area where the LED assist light reaches, acase where the LED assist light is not projected to the object due tothe vignetting by the image-capturing lens 300, a case where the LEDassist light does not reach the object because of a long object distanceand others.

As another method of determining whether an object is present, a methodcan be employed which performs the focus detection during the emissionof the LED assist light and determines that the object is present if thefocus detection can be performed.

However, in this method, a determination may be made that the object isnot present even though the object is present because theimage-capturing lens 300 is largely defocused from the object andthereby the focus detection cannot be performed. Accordingly, the systemcontroller 50 can perform, by determining whether the object is presentby using the change amount of the photometric values acquired before andduring the emission of the LED assist light, a proper object presencedetermination regardless of a defocus state of the image-capturing lens300.

Next, at S705, the system controller 50 determines that, if in the focusdetection area, the change amount of the photometric values acquiredbefore and during the emission of the LED assist light is equal to orlarger than a predetermined value, the object effectively receiving theLED assist light is present. Then, the system controller 50 ends thisobject presence determination process.

Next, with reference to FIGS. 15, 16A and 16B, description will be madeof the flash focusing process performed at S605 in FIG. 14. FIG. 15illustrates a typical drive method of driving the focus lens 311 whenthe flash assist light is emitted and emission times of the flash assistlight. A horizontal axis indicates time, and a vertical axis indicatesposition of the focus lens 311 (focus position). FIG. 15 illustrateschanges of the focus position when the focus lens 311 is driven from afocusing start position where the flash focusing process is started toan in-focus position where an in-focus state is obtained. Black dots inFIG. 15 indicate the emission times of the flash assist light.

First, the system controller 50 stops the focus lens 311 at the focusingstart position and causes the flash unit 48 to emit the flash assistlight twice (F1).

The two emissions of the flash assist light are performed for acquiringthe defocus amount at the start of focusing. The emission (intermittentemission) of the flash assist light performed in the state where thefocus lens 311 is stopped is hereinafter referred to as “a step flashlight emission”. The focus detection process performing focus detectionwith the step flash light emission corresponds to a first focusdetection process. The two emissions of the flash assist light will bedescribed later in detail.

The system controller 50 detects the defocus amount using the flashassist light (F1), and then starts driving the focus lens 311 (time T1).After starting the focus lens drive, when the focus lens 311 approachesthe in-focus position, the system controller 50 causes the flash unit 48to intermittently emit the flash assist light while continuing the focuslens drive (M1). Continuous emission of the flash assist light duringthe focus lens drive increases power consumption of the camera 100.Thus, the system controller 50 starts the emission of the flash assistlight when the focus lens 311 reaches a position set depending on thedefocus amount acquired before the focus lens drive. The intermittentemission of the flash assist light performed during the focus lens driveis hereinafter referred to as “a lens drive flash light emission”. Thefocus detection process performing focus detection with the lens driveflash light emission corresponds to a second focus detection process.

The system controller 50 stops driving the focus lens 311 at thein-focus position corresponding to the defocus amount acquired by thefocus detection process with the lens drive flash light emission.Thereafter, the system controller 50 again performs the step flash lightemission (F2) to confirm whether the defocus amount is in apredetermined in-focus range. Then, the system controller 50 ends theflash focusing process.

A flowchart of FIGS. 16A and 16B illustrate the focus detection with thestep flash light emission in detail. At S801, the system controller 50initializes a counted value of the number of step flash light emissions.This embodiment provides an upper limit of the number of step flashlight emissions in order to reduce unwanted power consumption.

Next, at S802, the system controller 50 performs the focus detectionprocess with the step flash light emission (that is, the first focusdetection process) and light emission amount control. The systemcontroller 50 that is performing the focus detection concurrentlyperforms the light emission amount control for setting a light emissionamount in the lens drive flash light emission. At S802, the systemcontroller 50 selects the focus detection area where the focus detectionis performed later.

Next, at S803, the system controller 50 determines whether a focusdetection result whose reliability is high (that is, a focus detectionresult having a second reliability higher than a first reliability) hasbeen obtained. If the focus detection result whose reliability is highhas not been obtained (that is, the focus detection result only has thefirst reliability), the system controller 50 proceeds to S804 todetermine whether the focus detection with the step flash light emissionhas been performed at all predetermined focus positions.

As described, in this embodiment the system controller 50 moves thefocus lens 311 to the focus initial position for performing the flashlight emission. When the focus detection cannot be performed at thefocus initial position, the system controller 50 moves to the focus lens311 toward the infinite side, stops the focus lens 311 and then performsthe focus detection with the step flash light emission again. The numberof attempt times of the focus detection with the step flash lightemission is not limited.

For example, the focus detection with the step flash light emission maybe performed in each defocus amount detectable range described above, inthis case, the number of step flash light emissions is more than two.After the emission at the focus initial position, the step flash lightemission may be performed at a position of the focus lens 311 farther onthe close side than the infinite end by the defocus amount detectablerange. In this case, a maximum number of step flash light emissions withwhich the focus detection cannot be performed becomes two, which enablesa rapid determination whether focusing can be performed.

If determining at S804 that the focus detection with the step flashlight emission has been performed at all the predetermined focuspositions, the system controller 50 proceeds to S820 to determine thatfocusing cannot be performed, and then perform the same out-of-focusdisplay as at S211. If determining at S804 that the focus detection withthe step flash light emission has not been yet performed at all thepredetermined focus positions, the system controller 50 proceeds to S805to drive the focus lens 311 to a next focus position. Then, the systemcontroller 50 returns to S802.

The system controller 50 having determined at S803 that the focusdetection result whose reliability is high has been obtained proceeds toS806 to set a condition for the lens drive flash light emission. Thecondition of the lens drive flash light emission includes a defocusamount and a focus position (hereinafter referred to as “an emissionstart focus position”) at which the emission is started, and furtherincludes a drive speed of the focus lens 311. The condition will bedescribed later in detail.

Next, at S807, the system controller 50 starts the focus lens driveaccording to the condition set at S806. Then, at S808, the systemcontroller 50 determines whether the focus lens 311 has passed theemission start focus position set at S806. If the focus lens 311 has notyet passed the emission start focus position, the system controller 50repeats the determination at S808 while continuing the focus lens drive.

On the other hand, if the focus lens 311 has passed the emission startfocus position, the system controller 50 proceeds to S809 to perform thefocus detection with the lens drive flash light emission (that is, thesecond focus detection process). At S809, the system controller 50causes the flash unit 48 to emit the flash assist light insynchronization with a frame rate of image data production, and repeatsthe focus detection using the paired phase difference image signalsobtained from the focus detection area set (selected) at S802. Adetailed description will be made later.

Next, at S810, the system controller 50 determines whether the number oflens drive flash light emissions is equal to or less than apredetermined number. If the number of lens drive flash light emissionsis larger than the predetermined number, the system controller 50proceeds to S820 to stop the focus detection and perform theout-of-focus display. This is a process to regard an object detectedbefore the focus lens drive as being lost due to movement of the objector a user's framing and thereby prevent an unwanted emission. If thenumber of lens drive flash light emissions is equal to or less than thepredetermined number, the system controller 50 proceeds to S811.

At S811, the system controller 50 determines whether the defocus amountdetected at S809 is equal to or less than the predetermined defocusamount. If the detected defocus amount is larger than the predetermineddefocus amount, the system controller 50 returns to S809 to continue thefocus detection with the lens drive flash light emission. If thedetected defocus amount is equal to or less than the predetermineddefocus amount, the system controller 50 proceeds to S812 to stop thefocus lens drive.

Next, at S813, the system controller 50 performs, as at S802, the focusdetection process with the step flash light emission (that is, whilecausing the flash unit 48 to intermittently emit the flash assist light)and the light emission amount control.

Performing again the light emission amount control near the in-focusposition prevents the focus detection from being performed using pairedphase difference image signals saturated due to a change in defocusstate. For example, when the object includes a thin line, as a bluramount decreases from a blurred state to an in-focus state, a luminancelevel of the paired phase difference image signals increases and therebythe paired phase difference image signals are saturated. The saturatedpaired phase difference image signals cause a focus detection error, sothat the light emission amount control is performed near the in-focusposition.

The system controller 50 having finished the process at S813 determinesat S814 whether the detected defocus amount is smaller than an in-focusdetermination threshold. If the detected defocus amount is smaller thanthe in-focus determination threshold, the system controller 50 proceedsto S815 to cause the image display unit 28 to perform the in-focusdisplay as at S205, and then ends the flash focusing process.

The system controller 50 having determined that the detected defocusamount is equal to or larger than the in-focus determination thresholdproceeds to S816 to perform the focus lens drive depending on thedetected defocus amount.

After finishing (stopping) the focus lens drive at S816, the systemcontroller 50 determines at S817 whether the number of step flash lightemissions is equal to or less than a predetermined number. Since thestep flash light emission has been performed before the focus lens driveis started, the system controller 50 uses, as the number of step flashlight emissions in the determination, a total number of the step flashlight emissions from before the focus lens drive is started. If thenumber of step flash light emissions is larger than the predeterminednumber, the system controller 50 proceeds to S820 to stop the focusdetection and perform the out-of-focus display. If the number of stepflash light emissions is equal to or less than the predetermined number,the system controller 50 proceeds to S818 to perform the focus detectionwith emission of the flash assist light whose light emission amount hasbeen set depending on a result of the pre-performed light emissionamount control. At this S818, since it is expected that the defocusstate changes only slightly from S813, the system controller 50 performsthe focus detection using the result of the light emission amountcontrol obtained at S813 without newly performing the light emissionamount control.

This enables the focus detection with a high accuracy without performingunwanted light emission. If the defocus amount detected at S813 is largeand the defocus state at S818 is significantly changed from S813, thesystem controller 50 may newly perform the same process as that at S813.

Next, at S819, the system controller 50 increments the number of stepflash light emissions, and then returns to S814.

Next, with reference to a flowchart of FIG. 17, description will be madeof the focus detection process with the step flash light emission, whichis performed at S802 in FIG. 15. At S901, the system controller 50performs the focus detection in one or more focus detection areas presetwithout the flash light emission, determines the reliability of thefocus detection result, and selects and stores the focus detectionresult whose reliability is high.

Next, at S902, the system controller 50 causes the flash unit 48 to emitthe flash light having a first light emission amount, performs the focusdetection using the paired phase detection image signals insynchronization with the emission of the flash light, determines thereliability of the focus detection result, and selects and stores thefocus detection result whose reliability is high.

Next, at S903, the system controller 50 causes the flash unit 48 to emitthe flash light having a second light emission amount larger than thefirst light emission amount, performs the focus detection using thepaired phase detection image signals in synchronization with theemission of the flash light, determines the reliability of the focusdetection result, and selects and stores the focus detection resultwhose reliability is high.

Next, at S904, the system controller 50 uses the focus detection resultsacquired at S901, S902 and S903 to select the focus detection area inwhich focusing is performed among the multiple focus detection areas.Specifically, for example, the system controller 50 selects the focusdetection area including a closest object as the focus detection area inwhich focusing is performed.

This is because a main object as a user's image capturing target islikely to be located at a close distance. However, the method ofselecting the focus detection area in which focusing is performed is notlimited thereto. For example, the system controller 50 may averagemultiple focus detection results acquired with mutually different flashlight emission amounts and use the averaged focus detection result toselect the focus detection area in which focusing is performed.

In general, a higher contrast of the paired phase difference imagesignals increases an accuracy of defocus amount detection. However, theabove-described saturated paired phase difference image signals decreasethe accuracy. In such a case, the system controller 50 may detect thesaturated paired phase difference image signals acquired at S902 or S903and eliminate a focus detection result acquired from the saturatedpaired phase difference image signals.

Next, at S905, the system controller 50 performs a light emission amountcontrol process to acquire a light emission amount control result. Thesystem controller 50 does not perform the light emission amount controlprocess when the focus detection area selected at S904 is the focusdetection area corresponding to the focus detection result selected atS901. In addition, in subsequent focus detection, the system controller50 performs the focus detection without the AF assist light. On theother hand, the system controller 50 performs the light emission amountcontrol process when the focus detection area selected at S904 is thefocus detection area corresponding to the focus detection resultselected at S902 or S903.

The system controller 50 further acquires a photometric value(photometric information) obtained in the selected focus detection areawithout the flash light and a photometric value in the selected focusdetection area with the flash light having a light emission amount(first or second light emission amount) with which the selected focusdetection result has been obtained. Then, the system controller 50calculates, from a difference between the two photometric values, anecessary and sufficient light emission amount for performing focusdetection.

When BV_n represents the photometric value obtained without the flashlight, BV_af represents the photometric value obtained with the flashlight, and BV_T represents the necessary and sufficient light emissionamount for performing focus detection, the system controller 50calculates a gain G for a reference light emission amount, that is, theflash light emission amount with which the selected focus detectionresult has been obtained by following expression (1):G=(BV_T−BV_n)/(BV_af−BV_n)  (1)

Although expression (1) uses the photometric value in linear scale,photometric values in logarithmic scale are often used.

In this case, the system controller 50 may convert the photometric valuein logarithmic scale into a photometric value in linear scale tocalculate the gain G. The system controller 50 sets, from the calculatedgain G and the reference light emission amount, a light emission amountof the flash assist light for subsequent focus detection. This enablessetting a proper light emission amount, thereby making it possible toreduce unwanted power consumption and prevent a decrease in focusdetection accuracy due to the saturated paired phase difference imagesignals.

The system controller 50 having finished the acquisition of the lightemission amount control result proceeds to S906 to increment the numberof step flash light emissions, and then ends this focus detectionprocess with the step flash light emission.

Next, with reference to a flowchart of FIG. 18, description will be madeof the process to set the condition for the lens drive flash lightemission (lens drive flash light condition setting process), which isperformed at S806 of FIG. 16A. At S1001, the system controller 50 sets adefocus amount at which the lens drive flash light emission is started.As described with reference to FIG. 15, in order to reduce the powerconsumption, the system controller 50 starts the lens drive flash lightemission after the focus lens 311 approaches the in-focus position. Inthis process, the system controller 50 uses information on thedetectable defocus amount described at S212 in FIG. 7. A large defocusamount decrease a similarity of shapes of the paired phase differenceimage signals due to their blur, which results in focus detection error.Therefore, even in the detectable defocus amount range, a smallerdefocus amount provides a more highly-accurate focus detection result.In this embodiment, the system controller 50 sets a value calculated bymultiplying the detectable defocus amount by a coefficient α (forexample, 0.5) as an emission start defocus amount (first predetermineddefocus amount) at which the lens drive flash light emission is started.The system controller 50 sets the emission start defocus amount smalleras the number of flash light emissions from before the start of the lensdrive flash light emission increases, in order to keep a light emissionamount for recording image capturing after focusing. The systemcontroller 50 converts the emission start defocus amount, together withinformation on a current focus position, into an emission start focusposition.

Next, at S1002, the system controller 50 sets a focus lens drive speed(moving speed). Specifically, the system controller 50 sets the focuslens drive speed for performing a predetermined number of flash lightemissions within a range of the emission start defocus amount set atS1001. For example, when a sampling rate of the paired phase differenceimage signals is 60 fps, and the number of flash light emissions withina range of the emission start defocus amount (mm) is five, the systemcontroller 50 sets the focus lens drive speed to D/5×60 (mm/s). Withthis method, the system controller 50 sets the focus lens drive speedproperly depending on the emission start defocus amount and the samplingrate of the paired phase difference image signals.

Next, at S1003, the system controller 50 adjusts (sets) the lightemission amount in the lens drive flash emission or sets a gain for theimage-capturing signal, using the light emission amount control resultin the previous step flash light emission. The light emission amountadjustment and the gain setting are both effective for providing anecessary contrast to the paired phase difference image signals. Thesystem controller 50 performs the light emission amount adjustment orthe gain setting in consideration of flash light glare for objects suchas persons and animals, power consumption and an S/N ratio of the pairedphase difference image signals. For example, in order to increase thecontrast of the paired phase difference image signals, the systemcontroller 50 performs the gain setting when the object is a person, andperforms the light emission amount adjustment when the object is not aperson.

Specifically, the system controller 50 acquires multiple focus detectionresults by performing multiple focus detections with the step flashlight emissions whose light emission amounts are mutually different inthe respective focus detection or by setting mutually different gainsfor the output signals from the image sensor 14.

Then, the system controller 50 sets the light emission amount or thegain for subsequent focus detections. The system controller 50 may setthe light emission amount or the gain, using in addition to theabove-described multiple focus detection results, focus detectionresults acquired without the flash light from the flash unit 48.

The system controller 50 having finished the process at S1003 ends thislens drive flash light condition setting process.

Next, with reference to FIG. 19, description will be made of the lensdrive flash emission and the focus detection performed at S809 in FIG.16A, The system controller 50 can selectively set a frame rate indriving the image sensor 14 to a slow frame rate (first flame rate) anda fast frame rate (second frame rate).

At S1101, the system controller 50 sets the frame rate to the fast framerate.

For example, the system controller 50 changes the frame rate from 30 fpsas the slow frame rate to 60 fps as the fast frame rate. The flash lightemission is performed in a very short time, and thereby it isunnecessary to set the exposure time of the image sensor 14 long. It isonly necessary that the flash light emission be performed insynchronization with a time at which all the pixels of the image sensor14 are exposed.

Thereby, as long as an area illuminated by the flash light emission issufficiently wide, the paired phase difference image signals obtainedfrom the entire pixel area of the image sensor 14 have a sufficientcontrast. On the other hand, when the LED assist light is used,increasing the exposure time of the image sensor 14 increases thecontrast of the paired phase difference image signals. Therefore, inthis embodiment, the frame rate (second frame rate) set when the flashassist light is used is set faster than the frame rate (first framerate) set when the LED assist light is used. This setting enables fastfocusing when the flash assist light is used.

Furthermore, in this embodiment, the fast frame rate is set only whenthe lens drive flash light emission is performed. That is, the fastframe rate is used when the lens drive flash light emission isperformed, and the slow frame rate is used when the step flash lightemission is performed. The focus detection with the step flash lightemission uses, as described above, also the focus detection resultacquired without the flash light emission. Thus, increasing the framerate when the step flash light emission is performed causes a necessityto change the frame rate before and after the flash light emission,which increases a time lag between the focus detections. In thisembodiment, as described above, the focus detection area in whichfocusing is performed is selected by comparing the focus detectionresults respectively acquired when the flash light emission is notperformed, when the flash light emission with the first light emissionamount is performed and when the flash light emission with the secondlight emission amount is performed. Therefore, it is desirable toperform the focus detections under the same condition as far aspossible. Therefore, in this embodiment, the frame rate is increasedonly when the lens drive flash light emission is performed.

However, in a case where a time necessary for changing the frame rate isshort, the frame rate may be increased when the lens drive flash lightemission is not performed. That is, the focus detections with the stepflash light emission may be performed with proper changing of the framerate between when the flash light emission is not used and when theflash light emission is used.

Moreover, as described above, when the lens drive flash light emissionis performed, the focus detection result whose reliability is high islikely to be acquired. A small focus lens drive amount calculated fromthe focus detection result does not make the focusing significantlyfaster, so that it is unnecessary to change the frame rate to the fastframe rate.

In addition, in a case where the focus detection area is not selectedwhen the lens drive flash light emission is performed andhighly-reliable focus detection results are obtained both when the flashlight emission is used and when the flash light emission is not used, itis unnecessary to change the frame rate to the fast frame rate. Thisenables proper focusing for an image-capturing scene including a fardistance object that the flash light does not reach and a close distanceobject that the flash light reaches.

Next, at S1102, the system controller 50 performs the flash lightemission and the focus detection. The system controller 50 calculatesthe defocus amount using the paired phase difference image signalsacquired by the focus detection with the flash light emission whoselight emission amount has been preset.

Then, at S1103, the lens system controller 50 updates the focus lensdrive amount depending on the calculated defocus amount. In the flashlight emission and the focus detection during the focus lens drive, afocus detection error decreases as the detected defocus amount becomessmaller. Thus, updating the focus lens drive amount, that is, a targetposition of the focus lens 311 as described above enableshighly-accurate focusing.

In this embodiment, the focus detection using the intermittently emittedflash assist light with the focus lens being stopped and the focusdetection using the above flash assist light with the focus lens beingdriven (moved) are switched depending on whether the focus detectionresult has a high reliability. This enables fast focusing while reducingunwanted flash assist light emission when a highly-reliable focusdetection result is not obtained.

The above embodiment described the case of performing focusing using areliable focus detection result acquired at S809.

However, a determination of the reliability of the focus detectionresult may be made from a difference between a defocus amount (seconddetected defocus amount) detected at a certain focus position as a firstposition during the focus lens drive and an estimated defocus amountthat is estimated (calculated) for a state where the focus lens isdriven from the first position to another position as a second position,using a result (first detected defocus amount) of the focus detectionwith the step flash light emission, which has been acquired at the firstposition before the focus lens drive. When the difference between thesetwo defocus amounts is large (that is, the difference is larger than apredetermined difference), there is a possibility that the object haslargely moved or an image-capturing direction of the camera 100 has beenlargely changed.

In such a case, the focus lens drive and the focus detection may bestopped. This enables promptly finishing the focusing process using anunreliable focus detection result. Restarting the focusing process asnecessary by a user enables reducing the time required for the focusingprocess for an image-capturing target object.

An allowable number of flash light emissions during the focus lensdrive, which was described at S810, may be variable depending on thenumber of step flash light emissions before the focus lens drive. Asdescribed above, in order to reduce the power consumption and keep thelight emission amount for the recording image capturing after thefocusing, the allowable number of flash light emissions during the focuslens drive may be properly set. When increasing the number of flashlight emissions, increasing the emission start defocus amount enablesreducing an influence of an object's movement during the focus lensdrive, which enables performing a more reliable focus detection.

In this embodiment, the flash light emissions are performed with thepredetermined mutually different light emission amounts, and the pairedphase difference image signals acquired therewith are used for selectingthe focus detection area and calculating the defocus amount.Furthermore, in this embodiment, the light emission amount with whichthe selected focus detection result is obtained is set to the referencelight emission amount, and the light emission amount control foradjusting the subsequent light emission amount is performed using thereference light emission amount. This eliminates a necessity of thelight emission amount control before the focus detection, therebyenabling fast focusing. Moreover, performing the light emission amountcontrol with the step flash light emission enables acquiring ahighly-reliable focus detection result by one flash light emission. Thisenables reducing the number of lens drive flash light emissions and thenumber of subsequent step flash light emissions.

In addition, in this embodiment, the contrast of the paired phasedifference image signals (that is, of the object) is adjusted mainly byadjusting the light emission amount. However, the contrast of the pairedphase difference image signals may be adjusted by adjusting a gain forthe image-capturing signal read out from the image sensor 14. Theadjustment of the light emission amount is effective for the adjustmentof the contrast of an object that is closer and has a higherreflectance, which improves the S/N ratio of the paired phase differenceimage signals. On the other hand, the adjustment of the gain does notimprove the S/N ratio of the paired phase difference image signals, butenables performing the adjustment of the contrast more easily regardlessof the object's distance and reflectance.

Moreover, the above embodiment described the case where the focusdetection area is selected before the lens drive flash light emission.However, in a mode such as the above-described automatic selection modethat does not select the focus detection area even though ahighly-reliable focus detection result is obtained, the light emissionamount cannot be adjusted for the respective focus detection areas. Inthis case, the light emission amount may be selected from the firstlight emission amount, the second light emission amount and 0 (no lightemission). For example, the light emission amount with which a greaternumber of focus detection results is obtained or which correspond to afocus detection result indicating presence of a closer object may beselected

Embodiment 2

Next, description will be made of a second embodiment (Embodiment 2) ofthe present invention. Constituent elements in this embodiment common tothose in Embodiment 1 are denoted by the same reference numerals asthose in Embodiment 1, and description thereof is omitted. In thisembodiment, description will be mainly made of differences fromEmbodiment 1.

A flowchart of FIG. 20 illustrates an LED/flash focusing process inEmbodiment 2, which is performed at S206 in FIG. 7 instead of theLED/flash focusing process illustrated in FIG. 13 in Embodiment 1.

At S1201, the system controller 50 determines whether only the emissionof the flash assist light is allowed in the AF assist light necessitydetermination process performed beforehand. If the emission of the LEDassist light is not allowed and the emission of the flash assist lightis allowed, the system controller 50 proceeds to S1207. If both theemission of the LED assist light and the emission of the flash assistlight are allowed, the system controller 50 proceeds to S1202.

At S1202, the system controller 50 acquires a defocus amount as a resultof the focus detection performed at S4 in Embodiment 1. The systemcontroller 50 further determines whether the acquired defocus amount hasa high reliability. If the defocus amount has a high reliability, thesystem controller 50 proceeds to S1203.

At S1203, the system controller 50 determines whether a defocus amountwhose reliability is high has been detected in each focus detection areaset according to the focus detection area mode acquired at S6 inEmbodiment 1. If the defocus amount whose reliability is high has beendetected in each set focus detection area, the system controller 50proceeds to S1206, and otherwise the system controller 50 proceeds toS1204. The reason for proceeding from S1203 to S1206 only when thedefocus amount whose reliability is high has been detected in each setfocus detection area is that the reliability may become high in any ofthe focus detection areas due to emission of the AF assist light. Thesystem controller 50 attempts the focus detection using the AF assistlight when the reliability is low in any set focus detection area.

However, when the number of focus detection areas is large, it isunnecessary to use no AF assist light only when the reliability in eachset focus detection area is high. For example, a determination of usingno AF assist light may be made when the reliability is high only in thefocus detection area whose image height is near 0.

At S1204, the system controller 50 determines whether an object thateffectively receives the LED assist light is present. This objectpresence determination process is the same as the object presencedetermination process described with reference to the flowchart of FIG.11 in Embodiment 1.

Next, at S1205, the system controller 50 determines whether adetermination that the object effectively receiving the LED assist lightis present has been made. If the object is present, the systemcontroller 50 proceeds to S1206. If the object is not present, thesystem controller 50 proceeds to S1207.

On the other hand, at S1207, the system controller 50 performs a flashfocusing process. The flash focusing process performed at this step willbe described later in detail. The system controller 50 having finishedthe process at S1206 or S1207 ends the LED/Flash focusing process.

Next, with reference to FIGS. 21A and 21B, description will be made ofthe flash focusing process performed by the camera controller 50 atS1207 in FIG. 20. At S1301, the system controller 50 initializes acounted value of the number of step flash light emissions. The stepflash light emission was described in Embodiment 1. This embodiment alsoprovides an upper limit of the number of step flash light emissions inorder to reduce unwanted power consumption.

Next, at S1302, the system controller 50 performs the focus detectionprocess with the step flash light emission (that is, a first focusdetection process) and light emission amount control. The systemcontroller 50 that is performing the focus detection concurrentlyperforms the light emission amount control for setting a light emissionamount in the lens drive flash light emission. At S1302, the systemcontroller 50 selects the focus detection area where the focus detectionis performed later.

Next, at S1303, the system controller 50 determines whether a focusdetection result whose reliability is high (that is, a focus detectionresult having a second reliability higher than a first reliability) hasbeen obtained. If the focus detection result whose reliability is highhas not been obtained (that is, the focus detection result only has thefirst reliability), the system controller 50 proceeds to S1304 todetermine whether the focus detection with the step flash light emissionhas been performed at all predetermined focus positions.

Also in this embodiment the system controller 50 moves the focus lens311 to the focus initial position, which was described in Embodiment 1,for performing the flash light emission. When the focus detection cannotbe performed at the focus initial position, the system controller 50moves to the focus lens 311 toward the infinite side, stops the focuslens 311 and then performs the focus detection with the step flash lightemission again. The number of attempt times of the focus detection withthe step flash light emission is not limited. For example, the focusdetection with the step flash light emission may be performed in eachdefocus amount detectable range described above. In this case, thenumber of step flash light emissions is more than two. After theemission at the focus initial position, the step flash light emissionmay be performed at a position of the focus lens 311 farther on theclose side than the infinite end by the defocus amount detectable range.In this case, a maximum number of step flash light emissions with whichthe focus detection cannot be performed becomes two, which enables arapid determination whether focusing can be performed.

If determining at S1304 that the focus detection with the step flashlight emission has been performed at all the predetermined focuspositions, the system controller 50 proceeds to S1320 to determine thatthe focus detection cannot be performed and then perform the sameout-of-focus display as at S211. If determining at S1304 that the focusdetection with the step flash light emission has not been yet performedat all the predetermined focus positions, the system controller 50proceeds to S1305 to drive the focus lens 311 to a next focus position.Then, the system controller 50 returns to S1302. The system controller50 having determined at S1303 that the focus detection result whosereliability is high has been obtained proceeds to S1306 to set acondition for a lens drive flash light emission. The lens drive flashlight emission was described in Embodiment 1. The condition of the lensdrive flash light emission includes, as the condition described inEmbodiment 1 with reference to FIG. 18, the defocus amount and theemission start focus position at which the emission is started, andfurther includes the drive speed of the focus lens 311.

Next, at S1307, the system controller 50 starts the focus lens driveaccording to the condition set at S1306. Then, at S1308, the systemcontroller 50 determines whether the focus lens 311 has passed theemission start focus position set at S1306. If the focus lens 311 hasnot yet passed the emission start focus position, the system controller50 repeats the determination at S1308 while continuing the focus lensdrive. On the other hand, if the focus lens 311 has passed the emissionstart focus position, the system controller 50 proceeds to S1309 toperform the focus detection with the lens drive flash light emission(that is, a second focus detection process). At S1309, the systemcontroller 50 causes the flash unit 48 to emit the flash assist light insynchronization with a frame rate of image data production, and repeatsthe focus detection using the paired phase difference image signalsobtained from the focus detection area set (selected) at S1302. Theselens drive flash emission and the focus detection are the same as thosedescribed with reference to FIG. 19 in Embodiment 1.

Next, at S1310, the system controller 50 determines whether the numberof lens drive flash light emissions is equal to or less than apredetermined number. If the number of lens drive flash light emissionsis larger than the predetermined number, the system controller 50proceeds to S1316. If the number of lens drive flash light emissions isequal to or less than the predetermined number, the system controller 50proceeds to S1311.

At S1311, the system controller 50 determines whether the defocus amountdetected at S1309 is equal to or less than the predetermined defocusamount. In other words, the system controller 50 determines whether thedetected defocus amount includes only a small error and thereby enablesthe focus lens 311 to move to an in-focus position. If the detecteddefocus amount is larger than the predetermined defocus amount, thesystem controller 50 returns to S1309 to continue the focus detectionwith the lens drive flash light emission. If the detected defocus amountis equal to or less than the predetermined defocus amount, the systemcontroller 50 proceeds to S1312 to stop the focus lens drive, and thenproceeds to S1313.

At S1313, the system controller 50 performs, when obtaining a focusdetection result having a third reliability higher than the secondreliability, the focus detection process with the step flash lightemission (that is, while causing the flash unit 48 to intermittentlyemit the flash assist light) and the light emission amount control. Thethird reliability is given to the detected defocus amount enabling thefocus lens 311 to move to the in-focus position. The focus detectionprocess with the step flash light emission and the light emission amountcontrol performed at this step correspond to a third focus detectionprocess. The detailed process at S1313 is the same as that describedwith reference to FIG. 17 in Embodiment 1. Performing again the lightemission amount control near the in-focus position prevents the focusdetection from being performed using paired phase difference imagesignals saturated due to a change in defocus state. For example, whenthe object includes a thin line, as a blur amount decreases from ablurred state to an in-focus state, a luminance level of the pairedphase difference image signals increases and thereby the paired phasedifference image signals are saturated. The saturated paired phasedifference image signals cause a focus detection error, so that thelight emission amount control is performed near the in-focus position.The system controller 50 having finished the process at S1313 determinesat S1314 whether the detected defocus amount is smaller than an in-focusdetermination threshold. If the detected defocus amount is smaller thanthe in-focus determination threshold, the system controller 50 proceedsto S1315 to cause the image display unit 28 to perform the in-focusdisplay as at S205 in FIG. 7 in Embodiment 1, and then ends the flashfocusing process.

The system controller 50 having determined that the detected defocusamount (having a reliability equal to or lower than the thirdreliability) is equal to or larger than the in-focus determinationthreshold proceeds to S1717 to perform the focus lens drive depending onthe detected defocus amount.

On the other hand, the system controller 50 having proceeded from S1310to S1316 determines whether a focus detection result whose reliabilityis high (that is, a focus detection result having the second reliabilityhigher than the first reliability) has been obtained. If the focusdetection result whose reliability is high has not been obtained (thatis, the focus detection result only has the first reliability), thesystem controller 50 proceeds to S1321 to determine that focusing cannotbe performed, and then perform the same out-of-focus display as at S211in FIG. 7.

The system controller 50 having determined at S1316 that the focusdetection result whose reliability is equal to or higher than the secondreliability has been obtained proceeds to S1317 to perform the focuslens drive depending on the detected defocus amount. This processcorresponds to a fourth focus detection process. The fourth focusdetection process is a process to perform, since the focus detectionresult whose reliability is the second reliability or higher has beenobtained though the number of lens drive flash emissions has reached theupper limit (predetermined number), the focus lens drive without furtherflash light emission. The fourth focus detection process enables thefocus lens drive depending on the detected defocus amount without theflash light emission, and thereby enables continuing focusing without anout-of-focus determination even after the number of flash lightemissions reaches the predetermined number. The system controller 50having determined at S1316 that only the focus detection result whosereliability is lower than the second reliability has been obtainedregards the focus detection as being impossible to proceed to S131.

At S1316, in a case where the number of lens drive flash light emissionsis smaller than the predetermined number, the focus lens 311 stops afterpassing the in-focus position due to a high speed focus lens drive orthe like. In such a case, if the focus detection result whosereliability is equal to or higher than the second reliability has beenobtained, the fourth focus detection process may be performed.

After finishing (stopping) the focus lens drive at S1317, the systemcontroller 50 determines at S1318 whether the number of step flash lightemissions is equal to or less than a predetermined number. Since thestep flash light emission has been performed before the focus lens driveis started, the system controller 50 uses, as the number of step flashlight emissions in the determination, a total number of the step flashlight emissions from before the focus lens drive is started. If thenumber of step flash light emissions is larger than the predeterminednumber, the system controller 50 proceeds to S1321 to stop the focusdetection and perform the out-of-focus display.

If the number of step flash light emissions is equal to or less than thepredetermined number, the system controller 50 proceeds to S1319 toperform the focus detection with emission of the flash assist lightwhose light emission amount has been set depending on a result of thepre-performed light emission amount control. At this S1319, since it isexpected that the defocus state changes only slightly from S1313, thesystem controller 50 performs the focus detection using the result ofthe light emission amount control obtained at S1313 without newlyperforming the light emission amount control. This enables the focusdetection with a high accuracy without performing unwanted lightemission. If the defocus amount detected at S1313 is large and thedefocus state at S1319 is significantly changed from S1313, the systemcontroller 50 may newly perform the same process as that at S1313.

Next, at S1320, the system controller 50 increments the number of stepflash light emissions, and then returns to S1314.

As described above, in this embodiment, when the defocus amount whosereliability is high is detected after the number of lens drive flashlight emissions reaches the upper limit, the focus lens drive isperformed depending on the detected defocus amount without the flashlight emission, and then the focus detection with the step flash lightemission is performed. Thereby, the focus lens can be moved to thein-focus position. Accordingly, good focus detection can be performedusing the flash assist light that provides a proper luminance toobjects.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andtractions.

This application claims the benefit of Japanese Patent Application No.2017-213674, filed on Nov. 6, 2017 and Japanese Patent Application No.2018-123724, filed on Jun. 28, 2018, which are hereby incorporated byreference herein in their entirety.

What is claimed is:
 1. An image-capturing apparatus comprising: an imagesensor configured to capture an object image formed by animage-capturing optical system; a focus detector configured to performfocus detection using output from the image sensor; and a controllerconfigured to cause the focus detector to perform the focus detectionand configured to control (a) emission of a light emitter forilluminating an object and (b) movement of a focus element for focusing,wherein the controller is configured to selectively perform: (a) a firstfocus detection process that causes the focus detector to perform thefocus detection with the focus element being stopped while causing thelight emitter to emit light; and (b) a second focus detection processthat causes the focus detector to perform the focus detection with thefocus element being moved while causing the light emitter to emit thelight, wherein the controller is configured to perform the first focusdetection process when a reliability of a defocus amount obtained by thefocus detection is a first reliability and perform the second focusdetection process when the reliability is a second reliability higherthan the first reliability.
 2. The image-capturing apparatus accordingto claim 1, wherein the controller is configured to, in the second focusdetection process, stop the focus detection when a number of emissionsof the light emitter exceeds a predetermined number.
 3. Theimage-capturing apparatus according to claim 1, wherein the controlleris configured to stop the focus detection when a difference between (a)an estimated defocus amount that is calculated for a state where thefocus element is moved from a first position to a second position byusing a first detected defocus amount that has detected in the firstfocus detection process when the focus element has been located at thefirst position and (b) a second detected defocus amount that is detectedin the second focus detection process when the focus element is moved tothe second position is larger than a predetermined difference.
 4. Theimage-capturing apparatus according to claim 1, further comprising adisplay unit configured to display images obtained by image capturingusing the image sensor, wherein the controller is configured to performcontrol such that an image obtained when the light emitter emits thelight is not displayed on the display unit.
 5. The image-capturingapparatus according to claim 1, wherein the controller is configured todrive the image sensor at a first frame rate when performing the firstfocus detection process, and configured to drive the image sensor at asecond frame rate higher than the first frame rate when performing thesecond focus detection process.
 6. The image-capturing apparatusaccording to claim 5, wherein the controller is configured to drive theimage sensor at the first frame rate when performing the focus detectionwith continuous emission of the light emitter.
 7. A method ofcontrolling an image-capturing apparatus comprising an image sensorconfigured to capture an object image formed by an image-capturingoptical system, and a focus detector configured to perform focusdetection using output from the image sensor, the method comprising thesteps of: enabling emission of a light emitter for illuminating anobject; enabling movement of a focus element for focusing; andselectively performing: (a) a first focus detection process that causesthe focus detector to perform the focus detection with the focus elementbeing stopped while causing the light emitter to emit light; and (b) asecond focus detection process that causes the focus detector to performthe focus detection with the focus element being moved while causing thelight emitter to emit the light, wherein the first focus detectionprocess is performed when a reliability of a defocus amount obtained bythe focus detection is a first reliability and the second focusdetection process is performed when the reliability is a secondreliability higher than the first reliability.
 8. An image-capturingapparatus comprising: an image sensor configured to capture an objectimage formed by an image-capturing optical system; a focus detectorconfigured to perform focus detection using output from the imagesensor; and a controller configured to cause the focus detector toperform the focus detection and configured to control emission of alight emitter for illuminating an object, wherein the controller isconfigured to: acquire multiple focus detection results (a) by causingthe focus detector to perform multiple focus detections while causingthe light emitter to emit light with mutually different light emissionamounts in the respective focus detections or (b) by setting, in thefocus detection, mutually different gains for signals obtained from theimage sensor; and set, by using the multiple focus detection results, alight emission amount of the light emitter or a gain for the signal fromthe image sensor for a subsequent focus detection, wherein thecontroller is configured to selectively perform: (a) a first focusdetection process that causes the focus detector to perform the focusdetection with a focus element being stopped while causing the lightemitter to intermittently emit the light; and (b) a second focusdetection process that causes the focus detector to perform the focusdetection with the focus element being moved while causing the lightemitter to intermittently emit the light, and wherein the controller isconfigured to set, by using the multiple focus detection resultsacquired by the multiple focus detections in the first focus detectionprocess while causing the light emitter to intermittently emit the lightwith the mutually different light emission amounts in the respectivefocus detections, the light emission amount or the gain in the secondfocus detection process.
 9. An image-capturing apparatus comprising: animage sensor configured to capture an object image formed by animage-capturing optical system; a focus detector configured to performfocus detection using output from the image sensor; and a controllerconfigured to cause the focus detector to perform the focus detectionand configured to control (a) emission of a light emitter forilluminating an object and (b) movement of a focus element for focusing,wherein the controller is configured to selectively perform: (a) when adefocus amount as a focus detection result has a first reliability, afirst focus detection process that causes the focus detector to performthe focus detection with the focus element being stopped while causingthe light emitter to intermittently emit light; (b) when the defocusamount has a second reliability higher than the first reliability, asecond focus detection process that causes the focus detector to performthe focus detection with the focus element being moved while causing thelight emitter to intermittently emit the light; (c) when the defocusamount has a third reliability higher than the second reliability, athird focus detection process that causes the focus detector to performthe focus detection while causing the light emitter to intermittentlyemit the light; and (d) when a number of intermittent emissions of thelight emitter is a predetermined number or more and the defocus amounthas the second reliability, a fourth focus detection process that causesthe focus detector to perform the focus detection with the focus elementbeing moved.
 10. A method of controlling an image-capturing apparatuscomprising an image sensor configured to capture an object image formedby an image-capturing optical system, and a focus detector to performfocus detection using output from the image sensor, the methodcomprising the steps of: enabling emission of a light emitter forilluminating an object; enabling movement of a focus element forfocusing; and selectively performing: (a) when a defocus amount as afocus detection result has a first reliability, a first focus detectionprocess that causes the focus detector to perform the focus detectionwith the focus element being stopped while causing the light emitter tointermittently emit light; (b) when the defocus amount has a secondreliability higher than the first reliability, a second focus detectionprocess that causes the focus detector to perform the focus detectionwith the focus element being moved while causing the light emitter tointermittently emit the light; (c) when the defocus amount has a thirdreliability higher than the second reliability, a third focus detectionprocess that causes the focus detector to perform the focus detectionwhile causing the light emitter to intermittently emit the light; and(d) when a number of intermittent emissions of the light emitter is apredetermined number or more and the defocus amount has the secondreliability, a fourth focus detection process that causes the focusdetector to perform the focus detection with the focus element beingmoved.
 11. A method of controlling an image-capturing apparatuscomprising an image sensor configured to capture an object image formedby an image-capturing optical system, and a focus detector configured toperform focus detection using output from the image sensor, the methodcomprising the steps of: enabling emission of a light emitter forilluminating an object; and acquiring multiple focus detection results(a) by causing the focus detector to perform multiple focus detectionswhile causing the light emitter to emit light with mutually differentlight emission amounts in the respective focus detections or (b) bysetting, in the focus detection, mutually different gains for signalsobtained from the image sensor; setting, by using the multiple focusdetection results, a light emission amount of the light emitter or again for the signal from the image sensor for a subsequent focusdetection; and selectively performing: (a) a first focus detectionprocess that causes the focus detector to perform the focus detectionwith a focus element being stopped while causing the light emitter tointermittently emit the light; and (b) a second focus detection processthat causes the focus detector to perform the focus detection with thefocus element being moved while causing the light emitter tointermittently emit the light, wherein the setting step sets, by usingthe multiple focus detection results acquired by the multiple focusdetections in the first focus detection process while causing the lightemitter to intermittently emit the light with the mutually differentlight emission amounts in the respective focus detections, the lightemission amount or the gain in the second focus detection process. 12.An image-capturing apparatus comprising: an image sensor configured tocapture an object image formed by an image-capturing optical system; afocus detector configured to perform focus detection using output fromthe image sensor; and a controller configured to cause the focusdetector to perform the focus detection and configured to control (a)emission of a light emitter for illuminating an object and (b) movementof a focus element for focusing, wherein the controller is configured toselectively perform: (a) a first focus detection process that causes thefocus detector to perform the focus detection with the focus elementbeing stopped while causing the light emitter to intermittently emitlight; and (b) a second focus detection process that causes the focusdetector to perform the focus detection with the focus element beingmoved while causing the light emitter to intermittently emit the light,wherein the controller sets a condition of the second focus detectionprocess depending on a defocus amount obtained by the focus detection,wherein the controller performs a third focus detection process when adefocus amount obtained by a focus detection in the second focusdetection process is less than a predetermined value, and wherein thecontroller causes the focus detector to perform the focus detection withthe focus element being stopped while causing the light emitter to emitlight.
 13. The image-capturing apparatus according to claim 12, whereinthe controller sets a position of the focus element at which lightemission in the second focus detection process starts depending on thedefocus amount.
 14. The image-capturing apparatus according to claim 12,wherein the controller sets a moving velocity of the focus element inthe second focus detection process depending on the defocus amount and asampling rate in the focus detection.
 15. A method of controlling animage-capturing apparatus comprising an image sensor configured tocapture an object image formed by an image-capturing optical system, anda focus detector configured to perform focus detection using output fromthe image sensor, the method comprising the steps of: enabling emissionof a light emitter for illuminating an object; enabling movement of afocus element for focusing; and selectively performing: (a) a firstfocus detection process that causes the focus detector to perform thefocus detection with the focus element being stopped while causing thelight emitter to intermittently emit light; (b) a second focus detectionprocess that causes the focus detector to perform the focus detectionwith the focus element being moved while causing the light emitter tointermittently emit the light; and (c) a third focus detection processthat causes the focus detector to perform the focus detection with thefocus element being stopped while causing the light emitter to emitlight, wherein a condition of the second focus detection process is setdepending on a defocus amount obtained by the focus detection, andwherein the third focus detection process is performed when a defocusamount obtained by a focus detection in the second focus detectionprocess is less than a predetermined value.